<template>
  <div ref="pieChart1" style="width: 8rem; height: 8rem;"></div>
</template>
 
<script setup>
import { onMounted, ref } from 'vue';
import * as echarts from 'echarts';
 
const pieChart1 = ref(null);
 
onMounted(() => {
  const chartInstance = echarts.init(pieChart1.value);
  // const pieData =  [
  //         { value: 365, name: '本科' },
  //         { value: 365, name: '硕士' },
  //         { value: 65, name: '博士' },
  //       ]
const option = {
  title: {
    text: "1%\n\n人才占比",
    left: 'center',
    top: 'center',
    textStyle: {
      fontSize: 9 // 修改字体大小
    }
  },
  series: [
    {
      type: 'pie',
      color: [
        '#FFE9D9',
        '#FF7E4F'
      ],
      data: [
        {
          value: 280,
          name: ''
        },
        {
          value: 240,
          name: ''
        },
      ],
      radius: ['60%', '90%'],
      label:{
        show: false
      }
    }
  ]
};
 
  chartInstance.setOption(option);
});
</script>
 
<style>
/* 你的样式 */
</style>